<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-1">
  <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1"
 type="text/css">
  <title>Creating Indexes</title>
  <meta content="ByteRefinery.com" name="author">
</head>
<body>
<h1>Creating Indexes</h1>
<p>Even though Indexes are not database objects as defined by the SQL99
standard, and therefore there is no overriding definition of their
characteristics, <em class="UILabel">RMBench</em> does support
creation of table indexes. It should be noted that the final outcome of
the index definition depends on the database and DDL generator used for
the model. <br>
</p>
<p>As usual, an index can be created in 2 ways:<br>
</p>
<ul>
  <li>by clicking on the index symbol (<img alt="index"
 src="../../images/index.gif" style="width: 16px; height: 16px;">) in
the diagram pallette, and subsequently clicking on a table figure in
the diagram<br>
  </li>
  <li>by clicking on the add button (<img alt="add"
 src="../../images/add.gif" style="width: 16px; height: 16px;">) in the
    <em class="UILabel">Indexes</em> tab of the <em class="UILabel">Table
Details</em> view</li>
</ul>
<p>In either case, you will be presented with the index definition
dialog:</p>
<p><img alt="inedx editor" src="../../images/Index.png"
 style="width: 273px; height: 350px;"><br>
</p>
In this dialog, you can add the columns from the underlying table that
make up the index. You can also reorder the columns and determine the
sort order for each column. As you may guess, the state of the <em
 class="UILabel">Unique</em> checkbox determines whether the index will
be unique or not.<br>
<br>
<hr style="width: 100%; height: 2px;">Note that creating a unique index
is usually equivalent to creating a UNIQUE constraint, because most
database systems will implicitly create an index for the constraint.
However, unique constraints are covered by the SQL99 standard. You
might therefore consider <a href="constraints.html">creating a UNIQUE
constraint</a> instead of an index to make your model more portable<br>
<hr style="width: 100%; height: 2px;"><br>
</body>
</html>
